package HomeWork.Chapter03;

/**
 * Enjoy programming!!!
 * Time: 2021/11/4 -  23:07
 */
public class Record {
    public static void main(String[] args) {
        int[] record = {99, 33, 45, 65, 67};
        int[] A = new int[record.length] ;
        int[] B = new int[record.length] ;
        int[] C = new int[record.length] ;
        int[] D = new int[record.length] ;
        int[] E = new int[record.length] ;


        for (int i = 0; i < 5; i++) {
            if (record[i] <= 100 && record[i] >= 90) {
                A[i] = record[i];
            } else if (record[i] < 90 && record[i] >= 80) {
                B[i] = record[i];
            } else if (record[i] < 80 && record[i] >= 70) {
                C[i] = record[i];
            } else if (record[i] < 70 && record[i] >= 60) {
                D[i] = record[i];
            }
            else if(record[i] < 60){
                E[i] = record[i];
            }
            else {
                System.out.println("请输入有效成绩");
            }
        }
        for (int e : A){
            System.out.print(e + " ");
        }
        System.out.println();
        for (int e : B){
            System.out.print(e + " ");
        }
        System.out.println();
        for (int e : C){
            System.out.print(e + " ");
        }
        System.out.println();
        for (int e : D){
            System.out.print(e + " ");
        }
        System.out.println();
        for (int e : E){
            System.out.print(e + " ");
        }
//        System.out.println("B:" + B);
//        System.out.println("C:" + C);
//        System.out.println("D:" + D);
//        System.out.println("E:" + E);
    }
}
